package learningThread.api.stopApi.returnStop;

public class TestReturnStop {

    public static void main(String[] args) {
        try {
            //继承Thread
            MyThread thread = new MyThread();
            thread.start();
            Thread.sleep(2000);
            thread.interrupt();


        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
